 
<%@page import="com.yourcompany.struts.form.ProductDetailsForm"%>
<%@page import="com.dts.project.dao.ProductDetailsDao"%> 
 
 <%
 String target="ViewProductDetails.jsp?status=Updation failed";
 try
 {
 ProductDetailsForm form=new ProductDetailsForm();
 form.setItemId(Integer.parseInt(request.getParameter("itemId")));
 form.setItemRegDate(request.getParameter("itemRegDate"));
 form.setProductId(Integer.parseInt(request.getParameter("productId")));
 form.setCountryId(Integer.parseInt(request.getParameter("countryId")));
 form.setItemName(request.getParameter("itemName"));
 form.setItemImage(request.getParameter("itemImage"));
 form.setItemLaunchVideo(request.getParameter("itemLaunchVideo"));
 form.setItemDesc(request.getParameter("itemDesc"));
 form.setPrice(Integer.parseInt(request.getParameter("price")));
 ProductDetailsDao dao=new ProductDetailsDao();
 
 boolean flag=dao.UpdateProductDetails(form);
 System.out.println("this is flag"+flag);
 if(flag)
 {
 target="ViewProductDetails.jsp?status=Updation success";
 
 }
 }
 catch(Exception e)
 {
 e.printStackTrace();
 }
 //RequestDispatcher rd=request.getRequestDispatcher(target);
 //rd.forward(request,response);
 %> 